(component
  (core module $main (;0;)
    (type $thread-start-func-ty (;0;) (func (param i32)))
    (type (;1;) (func))
    (type (;2;) (func (param i32 i32)))
    (type (;3;) (func (result i32)))
    (type (;4;) (func (param i32 i32) (result i32)))
    (type (;5;) (func (param i32) (result i32)))
    (type (;6;) (func (param i32 i32 i32 i32) (result i32)))
    (import "[export]$root" "[task-cancel]" (func (;0;) (type 1)))
    (import "[export]$root" "[task-return]foo" (func (;1;) (type 2)))
    (import "[export]foo:foo/bar" "[task-return]foo" (func (;2;) (type 2)))
    (import "$root" "[context-get-1]" (func (;3;) (type 3)))
    (import "$root" "[context-set-1]" (func (;4;) (type $thread-start-func-ty)))
    (import "$root" "[thread-index]" (func (;5;) (type 3)))
    (import "$root" "[thread-new-indirect-v0]" (func (;6;) (type 4)))
    (import "$root" "[thread-switch-to]" (func (;7;) (type 5)))
    (import "$root" "[thread-suspend]" (func (;8;) (type 3)))
    (import "$root" "[thread-resume-later]" (func (;9;) (type $thread-start-func-ty)))
    (import "$root" "[thread-yield-to]" (func (;10;) (type 5)))
    (table (;0;) 1 1 funcref)
    (memory (;0;) 1)
    (export "thread_main" (func 11))
    (export "[async-lift-stackful]foo" (func 12))
    (export "[async-lift-stackful]foo:foo/bar#foo" (func 13))
    (export "memory" (memory 0))
    (export "__indirect_function_table" (table 0))
    (export "cabi_realloc" (func 14))
    (elem (;0;) (i32.const 0) func 0)
    (func (;11;) (type $thread-start-func-ty) (param i32)
      unreachable
    )
    (func (;12;) (type 2) (param i32 i32)
      unreachable
    )
    (func (;13;) (type 2) (param i32 i32)
      unreachable
    )
    (func (;14;) (type 6) (param i32 i32 i32 i32) (result i32)
      unreachable
    )
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
      (processed-by "my-fake-bindgen" "123.45")
    )
  )
  (core module $wit-component-shim-module (;1;)
    (type (;0;) (func (param i32 i32)))
    (type (;1;) (func (param i32 i32) (result i32)))
    (table (;0;) 3 3 funcref)
    (export "0" (func $task-return-foo))
    (export "1" (func $"#func1 task-return-foo"))
    (export "2" (func $thread.new-indirect))
    (export "$imports" (table 0))
    (func $task-return-foo (;0;) (type 0) (param i32 i32)
      local.get 0
      local.get 1
      i32.const 0
      call_indirect (type 0)
    )
    (func $"#func1 task-return-foo" (@name "task-return-foo") (;1;) (type 0) (param i32 i32)
      local.get 0
      local.get 1
      i32.const 1
      call_indirect (type 0)
    )
    (func $thread.new-indirect (;2;) (type 1) (param i32 i32) (result i32)
      local.get 0
      local.get 1
      i32.const 2
      call_indirect (type 1)
    )
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (core module $wit-component-fixup (;2;)
    (type (;0;) (func (param i32 i32)))
    (type (;1;) (func (param i32 i32) (result i32)))
    (import "" "0" (func (;0;) (type 0)))
    (import "" "1" (func (;1;) (type 0)))
    (import "" "2" (func (;2;) (type 1)))
    (import "" "$imports" (table (;0;) 3 3 funcref))
    (elem (;0;) (i32.const 0) func 0 1 2)
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (core instance $wit-component-shim-instance (;0;) (instantiate $wit-component-shim-module))
  (core func $task.cancel (;0;) (canon task.cancel))
  (alias core export $wit-component-shim-instance "0" (core func $task-return-foo (;1;)))
  (core instance $"[export]$root" (;1;)
    (export "[task-cancel]" (func $task.cancel))
    (export "[task-return]foo" (func $task-return-foo))
  )
  (alias core export $wit-component-shim-instance "1" (core func $"#core-func2 task-return-foo" (@name "task-return-foo") (;2;)))
  (core instance $"[export]foo:foo/bar" (;2;)
    (export "[task-return]foo" (func $"#core-func2 task-return-foo"))
  )
  (core func $"context.get 1" (;3;) (canon context.get i32 1))
  (core func $"context.set 1" (;4;) (canon context.set i32 1))
  (core func $thread.index (;5;) (canon thread.index))
  (alias core export $wit-component-shim-instance "2" (core func $thread.new-indirect (;6;)))
  (core func $thread.switch-to (;7;) (canon thread.switch-to))
  (core func $thread.suspend (;8;) (canon thread.suspend))
  (core func $thread.resume-later (;9;) (canon thread.resume-later))
  (core func $thread.yield-to (;10;) (canon thread.yield-to))
  (core instance $$root (;3;)
    (export "[context-get-1]" (func $"context.get 1"))
    (export "[context-set-1]" (func $"context.set 1"))
    (export "[thread-index]" (func $thread.index))
    (export "[thread-new-indirect-v0]" (func $thread.new-indirect))
    (export "[thread-switch-to]" (func $thread.switch-to))
    (export "[thread-suspend]" (func $thread.suspend))
    (export "[thread-resume-later]" (func $thread.resume-later))
    (export "[thread-yield-to]" (func $thread.yield-to))
  )
  (core instance $main (;4;) (instantiate $main
      (with "[export]$root" (instance $"[export]$root"))
      (with "[export]foo:foo/bar" (instance $"[export]foo:foo/bar"))
      (with "$root" (instance $$root))
    )
  )
  (alias core export $main "memory" (core memory $memory (;0;)))
  (alias core export $wit-component-shim-instance "$imports" (core table $"shim table" (;0;)))
  (alias core export $main "cabi_realloc" (core func $realloc (;11;)))
  (core func $task.return (;12;) (canon task.return (result string) (memory $memory) string-encoding=utf8))
  (core func $"#core-func13 task.return" (@name "task.return") (;13;) (canon task.return (result string) (memory $memory) string-encoding=utf8))
  (core type $thread-start (;0;) (func (param i32)))
  (alias core export $main "__indirect_function_table" (core table $indirect-function-table (;1;)))
  (core func $"#core-func14 thread.new-indirect" (@name "thread.new-indirect") (;14;) (canon thread.new-indirect $thread-start (table $indirect-function-table)))
  (core instance $fixup-args (;5;)
    (export "$imports" (table $"shim table"))
    (export "0" (func $task.return))
    (export "1" (func $"#core-func13 task.return"))
    (export "2" (func $"#core-func14 thread.new-indirect"))
  )
  (core instance $fixup (;6;) (instantiate $wit-component-fixup
      (with "" (instance $fixup-args))
    )
  )
  (type (;0;) (func (param "s" string) (result string)))
  (alias core export $main "[async-lift-stackful]foo" (core func $"[async-lift-stackful]foo" (;15;)))
  (func $foo (;0;) (type 0) (canon lift (core func $"[async-lift-stackful]foo") (memory $memory) (realloc $realloc) string-encoding=utf8 async))
  (export $"#func1 foo" (@name "foo") (;1;) "foo" (func $foo))
  (type (;1;) (func (param "s" string) (result string)))
  (alias core export $main "[async-lift-stackful]foo:foo/bar#foo" (core func $"[async-lift-stackful]foo:foo/bar#foo" (;16;)))
  (func $"#func2 foo" (@name "foo") (;2;) (type 1) (canon lift (core func $"[async-lift-stackful]foo:foo/bar#foo") (memory $memory) (realloc $realloc) string-encoding=utf8 async))
  (component $foo:foo/bar-shim-component (;0;)
    (type (;0;) (func (param "s" string) (result string)))
    (import "import-func-foo" (func (;0;) (type 0)))
    (type (;1;) (func (param "s" string) (result string)))
    (export (;1;) "foo" (func 0) (func (type 1)))
  )
  (instance $foo:foo/bar-shim-instance (;0;) (instantiate $foo:foo/bar-shim-component
      (with "import-func-foo" (func $"#func2 foo"))
    )
  )
  (export $foo:foo/bar (;1;) "foo:foo/bar" (instance $foo:foo/bar-shim-instance))
  (@producers
    (processed-by "wit-component" "$CARGO_PKG_VERSION")
  )
)
